package com.example.demo.service.security;

import lombok.Data;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

/**
 * @Author: ak
 * @Date: 2020/4/2 22:01
 */
@Data
public class Role implements Serializable {
    private Integer roleId;
    private String roleName;
    private Set<Permission> permissionSet=new HashSet<>();

    public Role(Integer roleId, String roleName) {
        this.roleId = roleId;
        this.roleName = roleName;
    }

    public Role() {
    }

    public void add(Permission permission){
        permissionSet.add(permission);
    }
}
